extends c

## 
# #include <...>
snippet inc
	#include <${1:iostream>}

##
# std::string
snippet str
	std::string ${1};

##
# std::string_view
snippet strv
	std::string_view ${1};

##
# std::array
snippet array
	std::array<${1:T}, ${2:N}> ${3};

##
# std::vector
snippet vector
	std::vector<${1:T}> ${2};
	
##
# std::deque
snippet deque
	std::deque<${1:T}> ${2};
	
##
# std::forward_list
snippet flist
	std::forward_list<${1:T}> ${2};
	
##
# std::list
snippet list
	std::list<${1:T}> ${2};
	
##
# std::set
snippet set
	std::set<${1:T}> ${2};
	
##
# std::map
snippet map
	std::map<${1:Key}, ${2:T}> ${3};
	
##
# std::multiset
snippet mset
	std::multiset<${1:T}> ${2};
	
##
# std::multimap
snippet mmap
	std::multimap<${1:Key}, ${2:T}> ${3};
	
##
# std::unordered_set
snippet uset
	std::unordered_set<${1:T}> ${2};
	
##
# std::unordered_map
snippet umap
	std::unordered_map<${1:Key}, ${2:T}> ${3};
	
##
# std::unordered_multiset
snippet umset
	std::unordered_multiset<${1:T}> ${2};
	
##
# std::unordered_multimap
snippet ummap
	std::unordered_multimap<${1:Key}, ${2:T}> ${3};
	
##
# std::stack
snippet stack
	std::stack<${1:T}> ${2};
	
##
# std::queue
snippet queue
	std::queue<${1:T}> ${2};
	
##
# std::priority_queue
snippet pqueue
	std::priority_queue<${1:T}> ${2};

##
# std::shared_ptr
snippet msp
	std::shared_ptr<${1:T}> ${2} = std::make_shared<$1>(${3});
	
##
snippet amsp
	auto ${1} = std::make_shared<${2:T}>(${3});
	
##
# std::unique_ptr
snippet mup
	std::unique_ptr<${1:T}> ${2} = std::make_unique<$1>(${3});
	
##
snippet amup
	auto ${1} = std::make_unique<${2:T}>(${3});

##
# private
snippet pri
	private
	
##
# protected
snippet pro
	protected
	
##
# public
snippet pub
	public
	
##
# friend
snippet fr
	friend
	
##
# mutable
snippet mu
	mutable

##
# namespace
snippet ns
	namespace ${1:`utility#Filename('', 'my')`} {
		${0}
	} // namespace $1

##
# anonymous namespace
snippet ans
	namespace {
		${0}
	}

##
# std::cout
snippet cout
	std::cout << ${1} << std::endl;

##
# std::cin
snippet cin
	std::cin >> ${1};

##
# static
snippet sca
	static_cast<${1:unsigned}>(${2:expr})${3}

##
# dynamic
snippet dca
	dynamic_cast<${1:unsigned}>(${2:expr})${3}

##
# reinterpret
snippet rca
	reinterpret_cast<${1:unsigned}>(${2:expr})${3}

##
# const
snippet cca
	const_cast<${1:unsigned}>(${2:expr})${3}

##
# foreach
snippet fore
	for (${1:auto} ${2:i} : ${3:container}) {
		${4}
	}

##
# iterator
snippet iter
	for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {
		${6}
	}

##
# auto iterator
snippet itera
	for (auto ${1:i} = ${2:container}.begin(); $1 != $2.end(); ++$1) {
		${3:std::cout << *$1 << std::endl;}
	}

## Lambdas
# lamda (one line)
snippet ld
	[${1}](${2}) { ${3} };

##
# lambda (multi-line)
snippet lld
	[${1}](${2}) {
		${3}
	};
